<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>失物招领</title>
    <link rel="stylesheet" href="css/index.css">
</head>
<body>
	<jsp:include page="../top.jsp"></jsp:include>

    <div class="index">
        <div class="type">
            <ul>
            <c:forEach items="${TYPES_SESSION }" var="type">
                <li>
                    <a href="allType?action=type&tid=${type.tid }"><span>${type.tname }</span></a>
                </li>
			</c:forEach>
            </ul>
        </div>
        <div class="content">
            <ul>
            <c:forEach items="${losts }" var="lost">
                <li>
                    <a href="showLost?lostId=${lost.lid }&cpage=cpage"><span>
                        <h3>${lost.ltitle }</h3>
                        <img src="${lost.limg }" alt="">
                        <p class="text">${lost.lmsg }</p>
                        <p class="date">${lost.ldate }</p>
                    </span></a>
                </li>
			</c:forEach>
            <c:if test="${!empty losts}">
                <li>
                        <span class="page" style="margin-left: 90px;"><a href="allType?action=${action}&set=top&keyWord=${keyWord}">首页</a></span>
                        <span class="page"><a href="allType?action=${action}&set=sub&keyWord=${keyWord}">上一页</a></span>
                        <span class="page">第&nbsp;${page.getStart()}&nbsp;页</span>
                        <span class="page"><a href="allType?action=${action}&set=add&keyWord=${keyWord}">下一页</a></span>
                        <span class="page"><a href="allType?action=${action}&set=bottom&keyWord=${keyWord}">尾页</a></span>
                        <span class="page" style="width: 140px;margin-bottom: 50px;">共&nbsp;${page.getTotalPage()}&nbsp;页&nbsp;${page.getTotal()}&nbsp;条数据</span>
                </li>
            </c:if>
            </ul>

        </div>

    </div>

</body>
</html>